#ifndef VSqlLog_H
#define VSqlLog_H					 

///////////////////////////////////////////////////////////////////////////////

class VSqlLog
{
public:
	static void setCanWrite(bool v) { m_canWrite = v;}
	static bool canWrite() { return m_canWrite;}

	static void setWriteToMap(bool v) { m_writeToMap = v;}
	static bool writeToMap() { return m_writeToMap;}
	
	static void write(const QString &v1,const QString &v2);
	static void writeFromMap();
	
private:
	static void writeX(const QString &v1,const QString &v2,int count = -1);

	static bool m_canWrite;
	static bool m_writeToMap;
	
	typedef QMap<QString,int> VMap2;
	typedef QMap<QString,VMap2> VMap1;
	static VMap1 m_map1;
};

///////////////////////////////////////////////////////////////////////////////

class VSqlLog_script
{
public:
	static void setCanWrite(bool v) { m_canWrite = v;}
	static bool canWrite() { return m_canWrite;}

	static void write(const QString &v1);

private:
	static bool m_canWrite;
};

///////////////////////////////////////////////////////////////////////////////

#endif
